home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OCEMail.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  48.9 KB  |  1,679 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCEMail.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT OCEMail;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __OCEMAIL__}
  27. {$SETC __OCEMAIL__ := 1}
  28.  
  29. {$I+}
  30. {$SETC OCEMailIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __FILES__}
  37. {$I Files.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __TEXTEDIT__}
  40. {$I TextEdit.p}
  41. {$ENDC}
  42.  
  43. {$IFC UNDEFINED __DIGITALSIGNATURE__}
  44. {$I DigitalSignature.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __OCE__}
  47. {$I OCE.p}
  48. {$ENDC}
  49. {$IFC UNDEFINED __OCEAUTHDIR__}
  50. {$I OCEAuthDir.p}
  51. {$ENDC}
  52. {$IFC UNDEFINED __OCEMESSAGING__}
  53. {$I OCEMessaging.p}
  54. {$ENDC}
  55.  
  56.  
  57. {$PUSH}
  58. {$ALIGN MAC68K}
  59. {$LibExport+}
  60.  
  61. {************************************************************************************}
  62. { Common Definitions }
  63. {************************************************************************************}
  64.  
  65. { reference to a new or open letter or message }
  66.  
  67. TYPE
  68.     MailMsgRef                            = LONGINT;
  69. { reference to an open msam queue }
  70.     MSAMQueueRef                        = LONGINT;
  71. { identifies slots managed by a PMSAM }
  72.     MSAMSlotID                            = UInt16;
  73. { reference to an active mailbox }
  74.     MailboxRef                            = LONGINT;
  75. { identifies slots within a mailbox }
  76.     MailSlotID                            = UInt16;
  77. { identifies a letter in a mailbox }
  78.     MailSeqNumPtr = ^MailSeqNum;
  79.     MailSeqNum = RECORD
  80.         slotID:                    MailSlotID;
  81.         seqNum:                    LONGINT;
  82.     END;
  83.  
  84. { A MailBuffer is used to describe a buffer used for an IO operation.
  85. The location of the buffer is pointed to by 'buffer'. 
  86. When reading, the size of the buffer is 'bufferSize' 
  87. and the size of data actually read is 'dataSize'.
  88. When writing, the size of data to be written is 'bufferSize' 
  89. and the size of data actually written is 'dataSize'.
  90. }
  91.     MailBufferPtr = ^MailBuffer;
  92.     MailBuffer = RECORD
  93.         bufferSize:                LONGINT;
  94.         buffer:                    Ptr;
  95.         dataSize:                LONGINT;
  96.     END;
  97.  
  98. { A MailReply is used to describe a commonly used reply buffer format.
  99. It contains a count of tuples followed by an array of tuples.
  100. The format of the tuple itself depends on each particular call.
  101. }
  102.     MailReplyPtr = ^MailReply;
  103.     MailReply = RECORD
  104.         tupleCount:                UInt16;
  105.                                                                         {  tuple[tupleCount]  }
  106.     END;
  107.  
  108. { Shared Memory Communication Area used when Mail Manager sends 
  109. High Level Events to a PMSAM. 
  110. }
  111.     SMCAPtr = ^SMCA;
  112.     SMCA = RECORD
  113.         smcaLength:                UInt16;                                    {  includes size of smcaLength field  }
  114.         result:                    OSErr;
  115.         userBytes:                LONGINT;
  116.         CASE INTEGER OF
  117.         0: (
  118.             slotCID:            CreationID;                                {  for create/modify/delete slot calls  }
  119.             );
  120.         1: (
  121.             msgHint:            LONGINT;                                {  for kMailEPPCMsgOpened  }
  122.             );
  123.     END;
  124.  
  125. {************************************************************************************}
  126. { Value of creator and types fields for messages and blocks defined by MailManager }
  127.  
  128. CONST
  129.     kMailAppleMailCreator        = 'apml';                        {  message and letter block creator  }
  130.     kMailLtrMsgType                = 'lttr';                        {  message type of letters, reports  }
  131.     kMailLtrHdrType                = 'lthd';                        {  contains letter header  }
  132.     kMailContentType            = 'body';                        {  contains content of letter  }
  133.     kMailEnclosureListType        = 'elst';                        {  contains list of enclosures  }
  134.     kMailEnclosureDesktopType    = 'edsk';                        {  contains desktop mgr info for enclosures  }
  135.     kMailEnclosureFileType        = 'asgl';                        {  contains a file enclosure, format is defined by AppleSingle  }
  136.     kMailImageBodyType            = 'imag';                        {  contains image of letter  }
  137.     kMailMSAMType                = 'gwyi';                        {  contains msam specific information  }
  138.     kMailTunnelLtrType            = 'tunl';                        {  used to read a tunnelled message  }
  139.     kMailHopInfoType            = 'hopi';                        {  used to read hopInfo for a tunnelled message  }
  140.     kMailReportType                = 'rpti';                        {  contains report info  }
  141.     kMailFamily                    = 'mail';                        {  Defines family of "mail" msgs: content, header, etc  }
  142.     kMailFamilyFile                = 'file';                        {  Defines family of "direct display" msgs  }
  143.  
  144. {    
  145. kMailImageBodyType:
  146.     format is struct TPfPgDir - in Printing.h
  147.     *    struct TPfPgDir (
  148.     *        short    pageCount;        - number of pages in the image.
  149.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  150.     *                                - to image of page n.
  151.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  152.  
  153. kMailReportType:
  154. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  155. This block has a header, IPMReportBlockHeader,
  156. followed by an array of elements, each of type IPMRecipientReport
  157.  
  158. Various families used by mail or related msgs
  159. }
  160.  
  161.  
  162. {************************************************************************************}
  163.  
  164. TYPE
  165.     MailAttributeID                        = UInt16;
  166. { Values of MailAttributeID }
  167. { Message store attributes - stored in the catalog }
  168. { Will always be present in a letter and have fixed sizes }
  169.  
  170. CONST
  171.     kMailLetterFlagsBit            = 1;                            {  MailLetterFlags  }
  172.                                                                 {  Letter attributes - stored in the letter will always be present in a letter and have fixed sizes  }
  173.     kMailIndicationsBit            = 3;                            {  MailIndications  }
  174.     kMailMsgTypeBit                = 4;                            {  OCECreatorType  }
  175.     kMailLetterIDBit            = 5;                            {  MailLetterID  }
  176.     kMailSendTimeStampBit        = 6;                            {  MailTime  }
  177.     kMailNestingLevelBit        = 7;                            {  MailNestingLevel  }
  178.     kMailMsgFamilyBit            = 8;                            {  OSType  }
  179.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have fixed sizes  }
  180.     kMailReplyIDBit                = 9;                            {  MailLetterID  }
  181.     kMailConversationIDBit        = 10;                            {  MailLetterID  }
  182.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have variable length sizes  }
  183.     kMailSubjectBit                = 11;                            {  RString  }
  184.     kMailFromBit                = 12;                            {  MailRecipient  }
  185.     kMailToBit                    = 13;                            {  MailRecipient  }
  186.     kMailCcBit                    = 14;                            {  MailRecipient  }
  187.     kMailBccBit                    = 15;                            {  MailRecipient  }
  188.  
  189.  
  190. TYPE
  191.     MailAttributeMask                    = UInt32;
  192. { Values of MailAttributeMask }
  193.  
  194. CONST
  195.     kMailLetterFlagsMask        = $00000001;
  196.     kMailIndicationsMask        = $00000004;
  197.     kMailMsgTypeMask            = $00000008;
  198.     kMailLetterIDMask            = $00000010;
  199.     kMailSendTimeStampMask        = $00000020;
  200.     kMailNestingLevelMask        = $00000040;
  201.     kMailMsgFamilyMask            = $00000080;
  202.     kMailReplyIDMask            = $00000100;
  203.     kMailConversationIDMask        = $00000200;
  204.     kMailSubjectMask            = $00000400;
  205.     kMailFromMask                = $00000800;
  206.     kMailToMask                    = $00001000;
  207.     kMailCcMask                    = $00002000;
  208.     kMailBccMask                = $00004000;
  209.  
  210.  
  211. TYPE
  212.     MailAttributeBitmap                    = UInt32;
  213. {************************************************************************************}
  214.     MailLetterSystemFlags                = UInt16;
  215. { Values of MailLetterSystemFlags }
  216. { letter is available locally (either by nature or via cache) }
  217.  
  218. CONST
  219.     kMailIsLocalBit                = 2;
  220.  
  221.     kMailIsLocalMask            = $00000004;
  222.  
  223.  
  224. TYPE
  225.     MailLetterUserFlags                    = UInt16;
  226.  
  227. CONST
  228.     kMailReadBit                = 0;                            {  this letter has been opened  }
  229.     kMailDontArchiveBit            = 1;                            {  this letter is not to be archived either because it has already been archived or it should not be archived.  }
  230.     kMailInTrashBit                = 2;                            {  this letter is in trash  }
  231.  
  232. { Values of MailLetterUserFlags }
  233.     kMailReadMask                = $00000001;
  234.     kMailDontArchiveMask        = $00000002;
  235.     kMailInTrashMask            = $00000004;
  236.  
  237.  
  238. TYPE
  239.     MailLetterFlagsPtr = ^MailLetterFlags;
  240.     MailLetterFlags = RECORD
  241.         sysFlags:                MailLetterSystemFlags;
  242.         userFlags:                MailLetterUserFlags;
  243.     END;
  244.  
  245.     MailMaskedLetterFlagsPtr = ^MailMaskedLetterFlags;
  246.     MailMaskedLetterFlags = RECORD
  247.         flagMask:                MailLetterFlags;                        {  flags that are to be set  }
  248.         flagValues:                MailLetterFlags;                        {  and their values  }
  249.     END;
  250.  
  251.  
  252. CONST
  253.     kMailOriginalInReportBit    = 1;
  254.     kMailNonReceiptReportsBit    = 3;
  255.     kMailReceiptReportsBit        = 4;
  256.     kMailForwardedBit            = 5;
  257.     kMailPriorityBit            = 6;
  258.     kMailIsReportWithOriginalBit = 8;
  259.     kMailIsReportBit            = 9;
  260.     kMailHasContentBit            = 10;
  261.     kMailHasSignatureBit        = 11;
  262.     kMailAuthenticatedBit        = 12;
  263.     kMailSentBit                = 13;
  264.     kMailNativeContentBit        = 14;
  265.     kMailImageContentBit        = 15;
  266.     kMailStandardContentBit        = 16;
  267.  
  268. { Values of MailIndications }
  269.     kMailStandardContentMask    = $00008000;
  270.     kMailImageContentMask        = $00004000;
  271.     kMailNativeContentMask        = $00002000;
  272.     kMailSentMask                = $00001000;
  273.     kMailAuthenticatedMask        = $00000800;
  274.     kMailHasSignatureMask        = $00000400;
  275.     kMailHasContentMask            = $00000200;
  276.     kMailIsReportMask            = $00000100;
  277.     kMailIsReportWithOriginalMask = $00000080;
  278.     kMailPriorityMask            = $00000060;
  279.     kMailForwardedMask            = $00000010;
  280.     kMailReceiptReportsMask        = $00000008;
  281.     kMailNonReceiptReportsMask    = $00000004;
  282.     kMailOriginalInReportMask    = $00000003;
  283.  
  284.  
  285. TYPE
  286.     MailIndications                        = UInt32;
  287. { values of the field originalInReport in MailIndications }
  288.  
  289. CONST
  290.     kMailNoOriginal                = 0;                            {  do not enclose original in reports  }
  291.     kMailEncloseOnNonReceipt    = 3;                            {  enclose original in non-delivery reports  }
  292.  
  293.  
  294. TYPE
  295.     MailLetterID                        = IPMMsgID;
  296.     MailLetterIDPtr                     = ^MailLetterID;
  297.     MailTimePtr = ^MailTime;
  298.     MailTime = RECORD
  299.         time:                    UTCTime;                                {  current UTC(GMT) time  }
  300.         offset:                    UTCOffset;                                {  offset from GMT  }
  301.     END;
  302.  
  303. { innermost letter has nestingLevel 0 }
  304.     MailNestingLevel                    = UInt16;
  305.     MailRecipient                        = OCERecipient;
  306.     MailRecipientPtr                     = ^MailRecipient;
  307. {************************************************************************************}
  308.  
  309. CONST
  310.     kMailTextSegmentBit            = 0;
  311.     kMailPictSegmentBit            = 1;
  312.     kMailSoundSegmentBit        = 2;
  313.     kMailStyledTextSegmentBit    = 3;
  314.     kMailMovieSegmentBit        = 4;
  315.  
  316.  
  317. TYPE
  318.     MailSegmentMask                        = UInt16;
  319. { Values of MailSegmentMask }
  320.  
  321. CONST
  322.     kMailTextSegmentMask        = $00000001;
  323.     kMailPictSegmentMask        = $00000002;
  324.     kMailSoundSegmentMask        = $00000004;
  325.     kMailStyledTextSegmentMask    = $00000008;
  326.     kMailMovieSegmentMask        = $00000010;
  327.  
  328.  
  329. TYPE
  330.     MailSegmentType                        = UInt16;
  331. { Values of MailSegmentType }
  332.  
  333. CONST
  334.     kMailInvalidSegmentType        = 0;
  335.     kMailTextSegmentType        = 1;
  336.     kMailPictSegmentType        = 2;
  337.     kMailSoundSegmentType        = 3;
  338.     kMailStyledTextSegmentType    = 4;
  339.     kMailMovieSegmentType        = 5;
  340.  
  341. {************************************************************************************}
  342.     kMailErrorLogEntryVersion    = $0101;
  343.     kMailMSAMErrorStringListID    = 128;                            {  These 'STR#' resources should be  }
  344.     kMailMSAMActionStringListID    = 129;                            {  in the PMSAM resource fork  }
  345.  
  346.  
  347. TYPE
  348.     MailLogErrorType                    = UInt16;
  349. { Values of MailLogErrorType }
  350.  
  351. CONST
  352.     kMailELECorrectable            = 0;
  353.     kMailELEError                = 1;
  354.     kMailELEWarning                = 2;
  355.     kMailELEInformational        = 3;
  356.  
  357.  
  358. TYPE
  359.     MailLogErrorCode                    = INTEGER;
  360. { Values of MailLogErrorCode }
  361.  
  362. CONST
  363.     kMailMSAMErrorCode            = 0;                            {  positive codes are indices into PMSAM defined strings  }
  364.     kMailMiscError                = -1;                            {  negative codes are OCE defined  }
  365.     kMailNoModem                = -2;                            {  modem required, but missing  }
  366.  
  367.  
  368. TYPE
  369.     MailErrorLogEntryInfoPtr = ^MailErrorLogEntryInfo;
  370.     MailErrorLogEntryInfo = RECORD
  371.         version:                INTEGER;
  372.         timeOccurred:            UTCTime;                                {  do not fill in  }
  373.         reportingPMSAM:            Str31;                                    {  do not fill in  }
  374.         reportingMSAMSlot:        Str31;                                    {  do not fill in  }
  375.         errorType:                MailLogErrorType;
  376.         errorCode:                MailLogErrorCode;
  377.         errorResource:            INTEGER;                                {  resources are valid if  }
  378.         actionResource:            INTEGER;                                {  errorCode = kMailMSAMErrorCode index starts from 1  }
  379.         filler:                    UInt32;
  380.         filler2:                UInt16;
  381.     END;
  382.  
  383. {************************************************************************************}
  384.     MailBlockMode                        = INTEGER;
  385. { Values of MailBlockMode }
  386.  
  387. CONST
  388.     kMailFromStart                = 1;                            {  write data from offset calculated from  }
  389.     kMailFromLEOB                = 2;                            {  start of block, end of block,  }
  390.     kMailFromMark                = 3;                            {  or from the current mark  }
  391.  
  392.  
  393. TYPE
  394.     MailEnclosureInfoPtr = ^MailEnclosureInfo;
  395.     MailEnclosureInfo = RECORD
  396.         enclosureName:            StringPtr;
  397.         catInfo:                CInfoPBPtr;
  398.         comment:                StringPtr;
  399.         icon:                    Ptr;
  400.     END;
  401.  
  402. {************************************************************************************}
  403.  
  404. CONST
  405.     kOCESetupLocationNone        = 0;                            {  disconnect state  }
  406.     kOCESetupLocationMax        = 8;                            {  maximum location value  }
  407.  
  408.  
  409. TYPE
  410.     OCESetupLocation                    = CHAR;
  411. { location state is a bitmask, 0x1=>1st location active, 
  412.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  413.  }
  414.     MailLocationFlags                    = UInt8;
  415.     MailLocationInfoPtr = ^MailLocationInfo;
  416.     MailLocationInfo = RECORD
  417.         location:                SInt8;
  418.         active:                    SInt8;
  419.     END;
  420.  
  421. {************************************************************************************}
  422. { Definitions for Personal MSAMs }
  423. {************************************************************************************}
  424.  
  425. CONST
  426.     kMailEPPCMsgVersion            = 3;
  427.  
  428.  
  429. TYPE
  430.     MailEPPCMsgPtr = ^MailEPPCMsg;
  431.     MailEPPCMsg = RECORD
  432.         version:                INTEGER;
  433.         CASE INTEGER OF
  434.         0: (
  435.             theSMCA:            SMCAPtr;                                {  for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn'  }
  436.             );
  437.         1: (
  438.             sequenceNumber:        LONGINT;                                {  for 'inqu', 'dlom'  }
  439.             );
  440.         2: (
  441.             locationInfo:        MailLocationInfo;                        {  for 'locc'  }
  442.             );
  443.     END;
  444.  
  445. { Values of OCE defined High Level Event message classes }
  446.  
  447. CONST
  448.     kMailEPPCCreateSlot            = 'crsl';
  449.     kMailEPPCModifySlot            = 'mdsl';
  450.     kMailEPPCDeleteSlot            = 'dlsl';
  451.     kMailEPPCShutDown            = 'quit';
  452.     kMailEPPCMailboxOpened        = 'mbop';
  453.     kMailEPPCMailboxClosed        = 'mbcl';
  454.     kMailEPPCMsgPending            = 'msgp';
  455.     kMailEPPCSendImmediate        = 'sndi';
  456.     kMailEPPCContinue            = 'cont';
  457.     kMailEPPCSchedule            = 'sked';
  458.     kMailEPPCAdmin                = 'admn';
  459.     kMailEPPCInQUpdate            = 'inqu';
  460.     kMailEPPCMsgOpened            = 'msgo';
  461.     kMailEPPCDeleteOutQMsg        = 'dlom';
  462.     kMailEPPCWakeup                = 'wkup';
  463.     kMailEPPCLocationChanged    = 'locc';
  464.  
  465.  
  466. TYPE
  467.     MailTimerPtr = ^MailTimer;
  468.     MailTimer = RECORD
  469.         CASE INTEGER OF
  470.         0: (
  471.             frequency:            LONGINT;                                {  how often to connect  }
  472.             );
  473.         1: (
  474.             connectTime:        LONGINT;                                {  time since midnight  }
  475.             );
  476.     END;
  477.  
  478.  
  479. CONST
  480.     kMailTimerOff                = 0;                            {  control is off  }
  481.     kMailTimerTime                = 1;                            {  specifies connect time (relative to midnight)  }
  482.     kMailTimerFrequency            = 2;                            {  specifies connect frequency  }
  483.  
  484.  
  485. TYPE
  486.     MailTimerKind                        = Byte;
  487.     MailTimersPtr = ^MailTimers;
  488.     MailTimers = RECORD
  489.         sendTimeKind:            SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  490.         receiveTimeKind:        SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  491.         send:                    MailTimer;
  492.         receive:                MailTimer;
  493.     END;
  494.  
  495.  
  496.     MailStandardSlotInfoAttributePtr = ^MailStandardSlotInfoAttribute;
  497.     MailStandardSlotInfoAttribute = RECORD
  498.         version:                INTEGER;
  499.         active:                    SInt8;                                    {  active if MailLocationMask(i) is set  }
  500.         padByte:                SInt8;
  501.         sendReceiveTimer:        MailTimers;
  502.     END;
  503.  
  504. {$IFC TYPED_FUNCTION_POINTERS}
  505.     MSAMIOCompletionProcPtr = PROCEDURE(VAR paramBlock: TempMSAMParam);
  506. {$ELSEC}
  507.     MSAMIOCompletionProcPtr = Register68kProcPtr;
  508. {$ENDC}
  509.  
  510.     MSAMIOCompletionUPP = UniversalProcPtr;
  511.     PMSAMGetMSAMRecordPBPtr = ^PMSAMGetMSAMRecordPB;
  512.     PMSAMGetMSAMRecordPB = RECORD
  513.         qLink:                    Ptr;
  514.         reservedH1:                LONGINT;
  515.         reservedH2:                LONGINT;
  516.         ioCompletion:            MSAMIOCompletionUPP;
  517.         ioResult:                OSErr;
  518.         saveA5:                    LONGINT;
  519.         reqCode:                INTEGER;
  520.         msamCID:                CreationID;
  521.     END;
  522.  
  523.     PMSAMOpenQueuesPBPtr = ^PMSAMOpenQueuesPB;
  524.     PMSAMOpenQueuesPB = RECORD
  525.         qLink:                    Ptr;
  526.         reservedH1:                LONGINT;
  527.         reservedH2:                LONGINT;
  528.         ioCompletion:            MSAMIOCompletionUPP;
  529.         ioResult:                OSErr;
  530.         saveA5:                    LONGINT;
  531.         reqCode:                INTEGER;
  532.         inQueueRef:                MSAMQueueRef;
  533.         outQueueRef:            MSAMQueueRef;
  534.         msamSlotID:                MSAMSlotID;
  535.         filler:                    ARRAY [0..1] OF LONGINT;
  536.     END;
  537.  
  538.     PMSAMStatus                            = UInt16;
  539. { Values of PMSAMStatus }
  540.  
  541. CONST
  542.     kPMSAMStatusPending            = 1;                            {  for inQueue and outQueue  }
  543.     kPMSAMStatusError            = 2;                            {  for inQueue and outQueue  }
  544.     kPMSAMStatusSending            = 3;                            {  for outQueue only  }
  545.     kPMSAMStatusCaching            = 4;                            {  for inQueue only  }
  546.     kPMSAMStatusSent            = 5;                            {  for outQueue only  }
  547.  
  548.  
  549. TYPE
  550.     PMSAMSetStatusPBPtr = ^PMSAMSetStatusPB;
  551.     PMSAMSetStatusPB = RECORD
  552.         qLink:                    Ptr;
  553.         reservedH1:                LONGINT;
  554.         reservedH2:                LONGINT;
  555.         ioCompletion:            MSAMIOCompletionUPP;
  556.         ioResult:                OSErr;
  557.         saveA5:                    LONGINT;
  558.         reqCode:                INTEGER;
  559.         queueRef:                MSAMQueueRef;
  560.         seqNum:                    LONGINT;
  561.         msgHint:                LONGINT;                                {  for posting cache error,set this to 0 when report outq status  }
  562.         status:                    PMSAMStatus;
  563.     END;
  564.  
  565.     PMSAMLogErrorPBPtr = ^PMSAMLogErrorPB;
  566.     PMSAMLogErrorPB = RECORD
  567.         qLink:                    Ptr;
  568.         reservedH1:                LONGINT;
  569.         reservedH2:                LONGINT;
  570.         ioCompletion:            MSAMIOCompletionUPP;
  571.         ioResult:                OSErr;
  572.         saveA5:                    LONGINT;
  573.         reqCode:                INTEGER;
  574.         msamSlotID:                MSAMSlotID;                                {  0 for PMSAM errors  }
  575.         logEntry:                MailErrorLogEntryInfoPtr;
  576.         filler:                    ARRAY [0..1] OF LONGINT;
  577.     END;
  578.  
  579. {**************************************************************************************}
  580.  
  581. CONST
  582.     kMailMsgSummaryVersion        = 1;
  583.  
  584.  
  585. TYPE
  586.     MailMasterDataPtr = ^MailMasterData;
  587.     MailMasterData = RECORD
  588.         attrMask:                MailAttributeBitmap;                    {  indicates attributes present in MsgSummary  }
  589.         messageID:                MailLetterID;
  590.         replyID:                MailLetterID;
  591.         conversationID:            MailLetterID;
  592.     END;
  593.  
  594. { Values for addressedToMe in struct MailCoreData }
  595.  
  596. CONST
  597.     kAddressedAs_TO                = $01;
  598.     kAddressedAs_CC                = $02;
  599.     kAddressedAs_BCC            = $04;
  600.  
  601.  
  602. TYPE
  603.     MailCoreDataPtr = ^MailCoreData;
  604.     MailCoreData = RECORD
  605.         letterFlags:            MailLetterFlags;
  606.         messageSize:            UInt32;
  607.         letterIndications:        MailIndications;
  608.         messageType:            OCECreatorType;
  609.         sendTime:                MailTime;
  610.         messageFamily:            OSType;
  611.         reserved:                SInt8;
  612.         addressedToMe:            SInt8;
  613.         agentInfo:                PACKED ARRAY [0..5] OF CHAR;            {  6 bytes of special info [set to zero]  }
  614.                                                                         {  these are variable length and even padded  }
  615.         sender:                    RString32;                                {  recipient's entityName (trunc) }
  616.         subject:                RString32;                                {  subject maybe truncated  }
  617.     END;
  618.  
  619.     MSAMMsgSummaryPtr = ^MSAMMsgSummary;
  620.     MSAMMsgSummary = RECORD
  621.         version:                INTEGER;                                {  following flags are defaulted by Toolbox  }
  622.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  623.         msgUpdated:                BOOLEAN;                                {  true if msgSummary was updated by MailManager  }
  624.         msgCached:                BOOLEAN;                                {  true if msg is in the slot's InQueue  }
  625.         padByte:                SInt8;
  626.         masterData:                MailMasterData;
  627.         coreData:                MailCoreData;
  628.     END;
  629.  
  630. { PMSAM can put up to 128 bytes of private msg summary data }
  631.  
  632. CONST
  633.     kMailMaxPMSAMMsgSummaryData    = 128;
  634.  
  635.  
  636. TYPE
  637.     PMSAMCreateMsgSummaryPBPtr = ^PMSAMCreateMsgSummaryPB;
  638.     PMSAMCreateMsgSummaryPB = RECORD
  639.         qLink:                    Ptr;
  640.         reservedH1:                LONGINT;
  641.         reservedH2:                LONGINT;
  642.         ioCompletion:            MSAMIOCompletionUPP;
  643.         ioResult:                OSErr;
  644.         saveA5:                    LONGINT;
  645.         reqCode:                INTEGER;
  646.         inQueueRef:                MSAMQueueRef;
  647.         seqNum:                    LONGINT;                                {  <- seq of the new message  }
  648.         msgSummary:                MSAMMsgSummaryPtr;                        {  attributes and mask filled in  }
  649.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be appended  }
  650.     END;
  651.  
  652.  
  653.     PMSAMPutMsgSummaryPBPtr = ^PMSAMPutMsgSummaryPB;
  654.     PMSAMPutMsgSummaryPB = RECORD
  655.         qLink:                    Ptr;
  656.         reservedH1:                LONGINT;
  657.         reservedH2:                LONGINT;
  658.         ioCompletion:            MSAMIOCompletionUPP;
  659.         ioResult:                OSErr;
  660.         saveA5:                    LONGINT;
  661.         reqCode:                INTEGER;
  662.         inQueueRef:                MSAMQueueRef;
  663.         seqNum:                    LONGINT;
  664.         letterFlags:            MailMaskedLetterFlagsPtr;                {  if not nil, then set msgStoreFlags  }
  665.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be overwritten  }
  666.     END;
  667.  
  668.     PMSAMGetMsgSummaryPBPtr = ^PMSAMGetMsgSummaryPB;
  669.     PMSAMGetMsgSummaryPB = RECORD
  670.         qLink:                    Ptr;
  671.         reservedH1:                LONGINT;
  672.         reservedH2:                LONGINT;
  673.         ioCompletion:            MSAMIOCompletionUPP;
  674.         ioResult:                OSErr;
  675.         saveA5:                    LONGINT;
  676.         reqCode:                INTEGER;
  677.         inQueueRef:                MSAMQueueRef;
  678.         seqNum:                    LONGINT;
  679.         msgSummary:                MSAMMsgSummaryPtr;                        {  if not nil, then read in the msgSummary  }
  680.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be read  }
  681.         msgSummaryOffset:        UInt16;                                    {  offset of PMSAM specific data from start of MsgSummary  }
  682.     END;
  683.  
  684. {**************************************************************************************}
  685. { Definitions for Server MSAMs }
  686. {************************************************************************************}
  687.     SMSAMAdminCode                        = UInt16;
  688. { Values of SMSAMAdminCode }
  689.  
  690. CONST
  691.     kSMSAMNotifyFwdrSetupChange    = 1;
  692.     kSMSAMNotifyFwdrNameChange    = 2;
  693.     kSMSAMNotifyFwdrPwdChange    = 3;
  694.     kSMSAMGetDynamicFwdrParams    = 4;
  695.  
  696.  
  697. TYPE
  698.     SMSAMSlotChanges                    = UInt32;
  699.  
  700. CONST
  701.     kSMSAMFwdrHomeInternetChangedBit = 0;
  702.     kSMSAMFwdrConnectedToChangedBit = 1;
  703.     kSMSAMFwdrForeignRLIsChangedBit = 2;
  704.     kSMSAMFwdrMnMServerChangedBit = 3;
  705.  
  706. { Values of SMSAMSlotChanges }
  707.     kSMSAMFwdrEverythingChangedMask = -1;
  708.     kSMSAMFwdrHomeInternetChangedMask = $00000001;
  709.     kSMSAMFwdrConnectedToChangedMask = $00000002;
  710.     kSMSAMFwdrForeignRLIsChangedMask = $00000004;
  711.     kSMSAMFwdrMnMServerChangedMask = $00000008;
  712.  
  713. { kSMSAMNotifyFwdrSetupChange }
  714.  
  715. TYPE
  716.     SMSAMSetupChangePtr = ^SMSAMSetupChange;
  717.     SMSAMSetupChange = RECORD
  718.         whatChanged:            SMSAMSlotChanges;                        {   --> bitmap of what parameters changed  }
  719.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  720.     END;
  721.  
  722. { kSMSAMNotifyFwdrNameChange }
  723.     SMSAMNameChangePtr = ^SMSAMNameChange;
  724.     SMSAMNameChange = RECORD
  725.         newName:                RString;                                {   --> msams new name  }
  726.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  727.     END;
  728.  
  729. { kSMSAMNotifyFwdrPasswordChange }
  730.     SMSAMPasswordChangePtr = ^SMSAMPasswordChange;
  731.     SMSAMPasswordChange = RECORD
  732.         newPassword:            RString;                                {   --> msams new password  }
  733.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  734.     END;
  735.  
  736. { kSMSAMGetDynamicFwdrParams }
  737.     SMSAMDynamicParamsPtr = ^SMSAMDynamicParams;
  738.     SMSAMDynamicParams = RECORD
  739.         curDiskUsed:            UInt32;                                    {  <--  amount of disk space used by msam  }
  740.         curMemoryUsed:            UInt32;                                    {  <--  amount of memory used by msam  }
  741.     END;
  742.  
  743.     SMSAMAdminEPPCRequestPtr = ^SMSAMAdminEPPCRequest;
  744.     SMSAMAdminEPPCRequest = RECORD
  745.         adminCode:                SMSAMAdminCode;
  746.         CASE INTEGER OF
  747.         0: (
  748.             setupChange:        SMSAMSetupChange;
  749.             );
  750.         1: (
  751.             nameChange:            SMSAMNameChange;
  752.             );
  753.         2: (
  754.             passwordChange:        SMSAMPasswordChange;
  755.             );
  756.         3: (
  757.             dynamicParams:        SMSAMDynamicParams;
  758.             );
  759.     END;
  760.  
  761.     SMSAMSetupPBPtr = ^SMSAMSetupPB;
  762.     SMSAMSetupPB = RECORD
  763.         qLink:                    Ptr;
  764.         reservedH1:                LONGINT;
  765.         reservedH2:                LONGINT;
  766.         ioCompletion:            MSAMIOCompletionUPP;
  767.         ioResult:                OSErr;
  768.         saveA5:                    LONGINT;
  769.         reqCode:                INTEGER;
  770.         serverMSAM:                RecordIDPtr;
  771.         password:                RStringPtr;
  772.         gatewayType:            OSType;
  773.         gatewayTypeDescription:    RStringPtr;
  774.         catalogServerHint:        AddrBlock;
  775.     END;
  776.  
  777.     SMSAMStartupPBPtr = ^SMSAMStartupPB;
  778.     SMSAMStartupPB = RECORD
  779.         qLink:                    Ptr;
  780.         reservedH1:                LONGINT;
  781.         reservedH2:                LONGINT;
  782.         ioCompletion:            MSAMIOCompletionUPP;
  783.         ioResult:                OSErr;
  784.         saveA5:                    LONGINT;
  785.         reqCode:                INTEGER;
  786.         msamIdentity:            AuthIdentity;
  787.         queueRef:                MSAMQueueRef;
  788.     END;
  789.  
  790.     SMSAMShutdownPBPtr = ^SMSAMShutdownPB;
  791.     SMSAMShutdownPB = RECORD
  792.         qLink:                    Ptr;
  793.         reservedH1:                LONGINT;
  794.         reservedH2:                LONGINT;
  795.         ioCompletion:            MSAMIOCompletionUPP;
  796.         ioResult:                OSErr;
  797.         saveA5:                    LONGINT;
  798.         reqCode:                INTEGER;
  799.         queueRef:                MSAMQueueRef;
  800.     END;
  801.  
  802. {**************************************************************************************}
  803. { Definitions for reading and writing MSAM Letters }
  804. {**************************************************************************************}
  805.     MSAMEnumeratePBPtr = ^MSAMEnumeratePB;
  806.     MSAMEnumeratePB = RECORD
  807.         qLink:                    Ptr;
  808.         reservedH1:                LONGINT;
  809.         reservedH2:                LONGINT;
  810.         ioCompletion:            MSAMIOCompletionUPP;
  811.         ioResult:                OSErr;
  812.         saveA5:                    LONGINT;
  813.         reqCode:                INTEGER;
  814.         queueRef:                MSAMQueueRef;
  815.         startSeqNum:            LONGINT;
  816.         nextSeqNum:                LONGINT;
  817.                                                                         {  buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue  }
  818.         buffer:                    MailBuffer;
  819.     END;
  820.  
  821.     MSAMEnumerateInQReplyPtr = ^MSAMEnumerateInQReply;
  822.     MSAMEnumerateInQReply = RECORD
  823.         seqNum:                    LONGINT;
  824.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  825.         msgUpdated:                BOOLEAN;                                {  true if MsgSummary has been updated by TB  }
  826.         msgCached:                BOOLEAN;                                {  true if msg is in the incoming queue  }
  827.         padByte:                SInt8;
  828.     END;
  829.  
  830.     MSAMEnumerateOutQReplyPtr = ^MSAMEnumerateOutQReply;
  831.     MSAMEnumerateOutQReply = RECORD
  832.         seqNum:                    LONGINT;
  833.         done:                    BOOLEAN;                                {  true if all responsible recipients have been processed  }
  834.         priority:                SInt8;
  835.         msgFamily:                OSType;
  836.         approxSize:                LONGINT;
  837.         tunnelForm:                BOOLEAN;                                {  true if this letter has to be tunnelled  }
  838.         padByte:                SInt8;
  839.         nextHop:                NetworkSpec;                            {  valid if tunnelForm is true  }
  840.         msgType:                OCECreatorType;
  841.     END;
  842.  
  843.     MSAMDeletePBPtr = ^MSAMDeletePB;
  844.     MSAMDeletePB = RECORD
  845.         qLink:                    Ptr;
  846.         reservedH1:                LONGINT;
  847.         reservedH2:                LONGINT;
  848.         ioCompletion:            MSAMIOCompletionUPP;
  849.         ioResult:                OSErr;
  850.         saveA5:                    LONGINT;
  851.         reqCode:                INTEGER;
  852.         queueRef:                MSAMQueueRef;
  853.         seqNum:                    LONGINT;
  854.         msgOnly:                BOOLEAN;                                {  only valid for PMSAM & inQueue  }
  855.                                                                         {  set true to delete message but not msgSummary  }
  856.         padByte:                SInt8;
  857.                                                                         {  only valid for SMSAM & tunnelled messages  }
  858.         result:                    OSErr;
  859.     END;
  860.  
  861.     MSAMOpenPBPtr = ^MSAMOpenPB;
  862.     MSAMOpenPB = RECORD
  863.         qLink:                    Ptr;
  864.         reservedH1:                LONGINT;
  865.         reservedH2:                LONGINT;
  866.         ioCompletion:            MSAMIOCompletionUPP;
  867.         ioResult:                OSErr;
  868.         saveA5:                    LONGINT;
  869.         reqCode:                INTEGER;
  870.         queueRef:                MSAMQueueRef;
  871.         seqNum:                    LONGINT;
  872.         mailMsgRef:                MailMsgRef;
  873.     END;
  874.  
  875.     MSAMOpenNestedPBPtr = ^MSAMOpenNestedPB;
  876.     MSAMOpenNestedPB = RECORD
  877.         qLink:                    Ptr;
  878.         reservedH1:                LONGINT;
  879.         reservedH2:                LONGINT;
  880.         ioCompletion:            MSAMIOCompletionUPP;
  881.         ioResult:                OSErr;
  882.         saveA5:                    LONGINT;
  883.         reqCode:                INTEGER;
  884.         mailMsgRef:                MailMsgRef;
  885.         nestedRef:                MailMsgRef;
  886.     END;
  887.  
  888.     MSAMClosePBPtr = ^MSAMClosePB;
  889.     MSAMClosePB = RECORD
  890.         qLink:                    Ptr;
  891.         reservedH1:                LONGINT;
  892.         reservedH2:                LONGINT;
  893.         ioCompletion:            MSAMIOCompletionUPP;
  894.         ioResult:                OSErr;
  895.         saveA5:                    LONGINT;
  896.         reqCode:                INTEGER;
  897.         mailMsgRef:                MailMsgRef;
  898.     END;
  899.  
  900.     MSAMGetMsgHeaderPBPtr = ^MSAMGetMsgHeaderPB;
  901.     MSAMGetMsgHeaderPB = RECORD
  902.         qLink:                    Ptr;
  903.         reservedH1:                LONGINT;
  904.         reservedH2:                LONGINT;
  905.         ioCompletion:            MSAMIOCompletionUPP;
  906.         ioResult:                OSErr;
  907.         saveA5:                    LONGINT;
  908.         reqCode:                INTEGER;
  909.         mailMsgRef:                MailMsgRef;
  910.         selector:                SInt8;
  911.         filler1:                BOOLEAN;
  912.         offset:                    UInt32;
  913.         buffer:                    MailBuffer;
  914.         remaining:                UInt32;
  915.     END;
  916.  
  917. {    MSAMGetAttributesPB.buffer returned will contain the attribute values of 
  918.     the attributes indicated in responseMask, 
  919.     from the attribute indicated by the least significant bit set
  920.     to the attribute indicated by the most significant bit set.
  921.     Note that recipients - from, to, cc, bcc cannot be read using
  922.     this call. Use GetRecipients to read these. 
  923. }
  924.     MSAMGetAttributesPBPtr = ^MSAMGetAttributesPB;
  925.     MSAMGetAttributesPB = RECORD
  926.         qLink:                    Ptr;
  927.         reservedH1:                LONGINT;
  928.         reservedH2:                LONGINT;
  929.         ioCompletion:            MSAMIOCompletionUPP;
  930.         ioResult:                OSErr;
  931.         saveA5:                    LONGINT;
  932.         reqCode:                INTEGER;
  933.         mailMsgRef:                MailMsgRef;
  934.         requestMask:            MailAttributeBitmap;                    {  kMailIndicationsBit thru kMailSubjectBit  }
  935.         buffer:                    MailBuffer;
  936.         responseMask:            MailAttributeBitmap;
  937.         more:                    BOOLEAN;
  938.         filler1:                BOOLEAN;
  939.     END;
  940.  
  941. { attrID value to get resolved recipient list }
  942.  
  943. CONST
  944.     kMailResolvedList            = 0;
  945.  
  946.  
  947. TYPE
  948.     MailOriginalRecipientPtr = ^MailOriginalRecipient;
  949.     MailOriginalRecipient = RECORD
  950.         index:                    INTEGER;
  951.     END;
  952.  
  953. { Followed by OCEPackedRecipient }
  954.  
  955.  
  956.     MailResolvedRecipientPtr = ^MailResolvedRecipient;
  957.     MailResolvedRecipient = RECORD
  958.         index:                    INTEGER;
  959.         recipientFlags:            INTEGER;
  960.         responsible:            BOOLEAN;
  961.         padByte:                SInt8;
  962.     END;
  963.  
  964. { Followed by OCEPackedRecipient }
  965.  
  966.  
  967. {     MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
  968.     MailOriginalRecipient if getting original recipients 
  969.                             ie the attrID is kMail[From, To, Cc, Bcc]Bit
  970.     MailResolvedRecipient if getting resolved reicpients
  971.                             ie the attrID is kMailResolvedList
  972.     Both tuples are word alligned.  
  973. }
  974.     MSAMGetRecipientsPBPtr = ^MSAMGetRecipientsPB;
  975.     MSAMGetRecipientsPB = RECORD
  976.         qLink:                    Ptr;
  977.         reservedH1:                LONGINT;
  978.         reservedH2:                LONGINT;
  979.         ioCompletion:            MSAMIOCompletionUPP;
  980.         ioResult:                OSErr;
  981.         saveA5:                    LONGINT;
  982.         reqCode:                INTEGER;
  983.         mailMsgRef:                MailMsgRef;
  984.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  985.         startIndex:                UInt16;                                    {  starts at 1  }
  986.         buffer:                    MailBuffer;
  987.         nextIndex:                UInt16;
  988.         more:                    BOOLEAN;
  989.         filler1:                BOOLEAN;
  990.     END;
  991.  
  992.     MSAMGetContentPBPtr = ^MSAMGetContentPB;
  993.     MSAMGetContentPB = RECORD
  994.         qLink:                    Ptr;
  995.         reservedH1:                LONGINT;
  996.         reservedH2:                LONGINT;
  997.         ioCompletion:            MSAMIOCompletionUPP;
  998.         ioResult:                OSErr;
  999.         saveA5:                    LONGINT;
  1000.         reqCode:                INTEGER;
  1001.         mailMsgRef:                MailMsgRef;
  1002.         segmentMask:            MailSegmentMask;
  1003.         buffer:                    MailBuffer;
  1004.         textScrap:                StScrpRecPtr;
  1005.         script:                    ScriptCode;
  1006.         segmentType:            MailSegmentType;
  1007.         endOfScript:            BOOLEAN;
  1008.         endOfSegment:            BOOLEAN;
  1009.         endOfContent:            BOOLEAN;
  1010.         filler1:                BOOLEAN;
  1011.         segmentLength:            LONGINT;                                {  NEW: <-  valid first call in a segment  }
  1012.         segmentID:                LONGINT;                                {  NEW: <-> identifier for this segment  }
  1013.     END;
  1014.  
  1015.     MSAMGetEnclosurePBPtr = ^MSAMGetEnclosurePB;
  1016.     MSAMGetEnclosurePB = RECORD
  1017.         qLink:                    Ptr;
  1018.         reservedH1:                LONGINT;
  1019.         reservedH2:                LONGINT;
  1020.         ioCompletion:            MSAMIOCompletionUPP;
  1021.         ioResult:                OSErr;
  1022.         saveA5:                    LONGINT;
  1023.         reqCode:                INTEGER;
  1024.         mailMsgRef:                MailMsgRef;
  1025.         contentEnclosure:        BOOLEAN;
  1026.         padByte:                SInt8;
  1027.         buffer:                    MailBuffer;
  1028.         endOfFile:                BOOLEAN;
  1029.         endOfEnclosures:        BOOLEAN;
  1030.     END;
  1031.  
  1032.     MailBlockInfoPtr = ^MailBlockInfo;
  1033.     MailBlockInfo = RECORD
  1034.         blockType:                OCECreatorType;
  1035.         offset:                    UInt32;
  1036.         blockLength:            UInt32;
  1037.     END;
  1038.  
  1039.     MSAMEnumerateBlocksPBPtr = ^MSAMEnumerateBlocksPB;
  1040.     MSAMEnumerateBlocksPB = RECORD
  1041.         qLink:                    Ptr;
  1042.         reservedH1:                LONGINT;
  1043.         reservedH2:                LONGINT;
  1044.         ioCompletion:            MSAMIOCompletionUPP;
  1045.         ioResult:                OSErr;
  1046.         saveA5:                    LONGINT;
  1047.         reqCode:                INTEGER;
  1048.         mailMsgRef:                MailMsgRef;
  1049.         startIndex:                UInt16;                                    {  starts at 1  }
  1050.         buffer:                    MailBuffer;
  1051.                                                                         {      buffer contains a Mail Reply. Each tuple is a MailBlockInfo  }
  1052.         nextIndex:                UInt16;
  1053.         more:                    BOOLEAN;
  1054.         filler1:                BOOLEAN;
  1055.     END;
  1056.  
  1057.     MSAMGetBlockPBPtr = ^MSAMGetBlockPB;
  1058.     MSAMGetBlockPB = RECORD
  1059.         qLink:                    Ptr;
  1060.         reservedH1:                LONGINT;
  1061.         reservedH2:                LONGINT;
  1062.         ioCompletion:            MSAMIOCompletionUPP;
  1063.         ioResult:                OSErr;
  1064.         saveA5:                    LONGINT;
  1065.         reqCode:                INTEGER;
  1066.         mailMsgRef:                MailMsgRef;
  1067.         blockType:                OCECreatorType;
  1068.         blockIndex:                UInt16;
  1069.         buffer:                    MailBuffer;
  1070.         dataOffset:                UInt32;
  1071.         endOfBlock:                BOOLEAN;
  1072.         padByte:                SInt8;
  1073.         remaining:                UInt32;
  1074.     END;
  1075.  
  1076. { YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1077.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1078.  * REASONS.
  1079. }
  1080. { not valid for tunnel form letters }
  1081.     MSAMMarkRecipientsPBPtr = ^MSAMMarkRecipientsPB;
  1082.     MSAMMarkRecipientsPB = RECORD
  1083.         qLink:                    Ptr;
  1084.         reservedH1:                LONGINT;
  1085.         reservedH2:                LONGINT;
  1086.         ioCompletion:            MSAMIOCompletionUPP;
  1087.         ioResult:                OSErr;
  1088.         saveA5:                    LONGINT;
  1089.         reqCode:                INTEGER;
  1090.         queueRef:                MSAMQueueRef;
  1091.         seqNum:                    LONGINT;
  1092.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1093.     END;
  1094.  
  1095.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1096.  * queueRef, seqNum 
  1097. }
  1098. { not valid for tunnel form letters }
  1099.     MSAMnMarkRecipientsPBPtr = ^MSAMnMarkRecipientsPB;
  1100.     MSAMnMarkRecipientsPB = RECORD
  1101.         qLink:                    Ptr;
  1102.         reservedH1:                LONGINT;
  1103.         reservedH2:                LONGINT;
  1104.         ioCompletion:            MSAMIOCompletionUPP;
  1105.         ioResult:                OSErr;
  1106.         saveA5:                    LONGINT;
  1107.         reqCode:                INTEGER;
  1108.         mailMsgRef:                MailMsgRef;
  1109.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1110.     END;
  1111.  
  1112. {**************************************************************************************}
  1113.     MSAMCreatePBPtr = ^MSAMCreatePB;
  1114.     MSAMCreatePB = RECORD
  1115.         qLink:                    Ptr;
  1116.         reservedH1:                LONGINT;
  1117.         reservedH2:                LONGINT;
  1118.         ioCompletion:            MSAMIOCompletionUPP;
  1119.         ioResult:                OSErr;
  1120.         saveA5:                    LONGINT;
  1121.         reqCode:                INTEGER;
  1122.         queueRef:                MSAMQueueRef;
  1123.         asLetter:                BOOLEAN;                                {  indicate if we should create as letter or msg  }
  1124.         filler1:                BOOLEAN;
  1125.         msgType:                IPMMsgType;                                {  up to application discretion: must be of IPMSenderTag  kIPMOSFormatType for asLetter=true  }
  1126.         refCon:                    LONGINT;                                {  for messages only  }
  1127.         seqNum:                    LONGINT;                                {  set if creating message in the inQueue  }
  1128.         tunnelForm:                BOOLEAN;                                {  if true tunnelForm else newForm  }
  1129.         bccRecipients:            BOOLEAN;                                {  true if creating letter with bcc recipients  }
  1130.         newRef:                    MailMsgRef;
  1131.     END;
  1132.  
  1133.     MSAMBeginNestedPBPtr = ^MSAMBeginNestedPB;
  1134.     MSAMBeginNestedPB = RECORD
  1135.         qLink:                    Ptr;
  1136.         reservedH1:                LONGINT;
  1137.         reservedH2:                LONGINT;
  1138.         ioCompletion:            MSAMIOCompletionUPP;
  1139.         ioResult:                OSErr;
  1140.         saveA5:                    LONGINT;
  1141.         reqCode:                INTEGER;
  1142.         mailMsgRef:                MailMsgRef;
  1143.         refCon:                    LONGINT;                                {  for messages only  }
  1144.         msgType:                IPMMsgType;
  1145.     END;
  1146.  
  1147.     MSAMEndNestedPBPtr = ^MSAMEndNestedPB;
  1148.     MSAMEndNestedPB = RECORD
  1149.         qLink:                    Ptr;
  1150.         reservedH1:                LONGINT;
  1151.         reservedH2:                LONGINT;
  1152.         ioCompletion:            MSAMIOCompletionUPP;
  1153.         ioResult:                OSErr;
  1154.         saveA5:                    LONGINT;
  1155.         reqCode:                INTEGER;
  1156.         mailMsgRef:                MailMsgRef;
  1157.     END;
  1158.  
  1159.     MSAMSubmitPBPtr = ^MSAMSubmitPB;
  1160.     MSAMSubmitPB = RECORD
  1161.         qLink:                    Ptr;
  1162.         reservedH1:                LONGINT;
  1163.         reservedH2:                LONGINT;
  1164.         ioCompletion:            MSAMIOCompletionUPP;
  1165.         ioResult:                OSErr;
  1166.         saveA5:                    LONGINT;
  1167.         reqCode:                INTEGER;
  1168.         mailMsgRef:                MailMsgRef;
  1169.         submitFlag:                BOOLEAN;
  1170.         padByte:                SInt8;
  1171.         msgID:                    MailLetterID;
  1172.     END;
  1173.  
  1174.     MSAMPutMsgHeaderPBPtr = ^MSAMPutMsgHeaderPB;
  1175.     MSAMPutMsgHeaderPB = RECORD
  1176.         qLink:                    Ptr;
  1177.         reservedH1:                LONGINT;
  1178.         reservedH2:                LONGINT;
  1179.         ioCompletion:            MSAMIOCompletionUPP;
  1180.         ioResult:                OSErr;
  1181.         saveA5:                    LONGINT;
  1182.         reqCode:                INTEGER;
  1183.         mailMsgRef:                MailMsgRef;
  1184.         replyQueue:                OCERecipientPtr;
  1185.         sender:                    IPMSenderPtr;
  1186.         deliveryNotification:    SInt8;
  1187.         priority:                SInt8;
  1188.     END;
  1189.  
  1190.     MSAMPutAttributePBPtr = ^MSAMPutAttributePB;
  1191.     MSAMPutAttributePB = RECORD
  1192.         qLink:                    Ptr;
  1193.         reservedH1:                LONGINT;
  1194.         reservedH2:                LONGINT;
  1195.         ioCompletion:            MSAMIOCompletionUPP;
  1196.         ioResult:                OSErr;
  1197.         saveA5:                    LONGINT;
  1198.         reqCode:                INTEGER;
  1199.         mailMsgRef:                MailMsgRef;
  1200.         attrID:                    MailAttributeID;                        {  kMailIndicationsBit thru kMailSubjectBit  }
  1201.         buffer:                    MailBuffer;
  1202.     END;
  1203.  
  1204.     MSAMPutRecipientPBPtr = ^MSAMPutRecipientPB;
  1205.     MSAMPutRecipientPB = RECORD
  1206.         qLink:                    Ptr;
  1207.         reservedH1:                LONGINT;
  1208.         reservedH2:                LONGINT;
  1209.         ioCompletion:            MSAMIOCompletionUPP;
  1210.         ioResult:                OSErr;
  1211.         saveA5:                    LONGINT;
  1212.         reqCode:                INTEGER;
  1213.         mailMsgRef:                MailMsgRef;
  1214.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  1215.         recipient:                MailRecipientPtr;
  1216.         responsible:            BOOLEAN;                                {  valid for server and message msams only  }
  1217.         filler1:                BOOLEAN;
  1218.     END;
  1219.  
  1220.     MSAMPutContentPBPtr = ^MSAMPutContentPB;
  1221.     MSAMPutContentPB = RECORD
  1222.         qLink:                    Ptr;
  1223.         reservedH1:                LONGINT;
  1224.         reservedH2:                LONGINT;
  1225.         ioCompletion:            MSAMIOCompletionUPP;
  1226.         ioResult:                OSErr;
  1227.         saveA5:                    LONGINT;
  1228.         reqCode:                INTEGER;
  1229.         mailMsgRef:                MailMsgRef;
  1230.         segmentType:            MailSegmentType;
  1231.         append:                    BOOLEAN;
  1232.         padByte:                SInt8;
  1233.         buffer:                    MailBuffer;
  1234.         textScrap:                StScrpRecPtr;
  1235.         startNewScript:            BOOLEAN;
  1236.         filler1:                BOOLEAN;
  1237.         script:                    ScriptCode;                                {  valid only if startNewScript is true  }
  1238.     END;
  1239.  
  1240.     MSAMPutEnclosurePBPtr = ^MSAMPutEnclosurePB;
  1241.     MSAMPutEnclosurePB = RECORD
  1242.         qLink:                    Ptr;
  1243.         reservedH1:                LONGINT;
  1244.         reservedH2:                LONGINT;
  1245.         ioCompletion:            MSAMIOCompletionUPP;
  1246.         ioResult:                OSErr;
  1247.         saveA5:                    LONGINT;
  1248.         reqCode:                INTEGER;
  1249.         mailMsgRef:                MailMsgRef;
  1250.         contentEnclosure:        BOOLEAN;
  1251.         padByte:                SInt8;
  1252.         hfs:                    BOOLEAN;                                {  true => in file system, false => in memory  }
  1253.         append:                    BOOLEAN;
  1254.         buffer:                    MailBuffer;                                {  Unused if hfs == true  }
  1255.         enclosure:                FSSpec;
  1256.         addlInfo:                MailEnclosureInfo;
  1257.     END;
  1258.  
  1259.     MSAMPutBlockPBPtr = ^MSAMPutBlockPB;
  1260.     MSAMPutBlockPB = RECORD
  1261.         qLink:                    Ptr;
  1262.         reservedH1:                LONGINT;
  1263.         reservedH2:                LONGINT;
  1264.         ioCompletion:            MSAMIOCompletionUPP;
  1265.         ioResult:                OSErr;
  1266.         saveA5:                    LONGINT;
  1267.         reqCode:                INTEGER;
  1268.         mailMsgRef:                MailMsgRef;
  1269.         refCon:                    LONGINT;                                {  for messages only  }
  1270.         blockType:                OCECreatorType;
  1271.         append:                    BOOLEAN;
  1272.         filler1:                BOOLEAN;
  1273.         buffer:                    MailBuffer;
  1274.         mode:                    MailBlockMode;                            {  if blockType is kMailTunnelLtrType or kMailHopInfoType  mode is assumed to be kMailFromMark  }
  1275.         offset:                    UInt32;
  1276.     END;
  1277.  
  1278. {**************************************************************************************}
  1279.     MSAMCreateReportPBPtr = ^MSAMCreateReportPB;
  1280.     MSAMCreateReportPB = RECORD
  1281.         qLink:                    Ptr;
  1282.         reservedH1:                LONGINT;
  1283.         reservedH2:                LONGINT;
  1284.         ioCompletion:            MSAMIOCompletionUPP;
  1285.         ioResult:                OSErr;
  1286.         saveA5:                    LONGINT;
  1287.         reqCode:                INTEGER;
  1288.         queueRef:                MSAMQueueRef;                            {  to distinguish personal and server MSAMs  }
  1289.         mailMsgRef:                MailMsgRef;
  1290.         msgID:                    MailLetterID;                            {  kMailLetterIDBit of letter being reported upon  }
  1291.         sender:                    MailRecipientPtr;                        {  sender of the letter you are creating report on  }
  1292.     END;
  1293.  
  1294.     MSAMPutRecipientReportPBPtr = ^MSAMPutRecipientReportPB;
  1295.     MSAMPutRecipientReportPB = RECORD
  1296.         qLink:                    Ptr;
  1297.         reservedH1:                LONGINT;
  1298.         reservedH2:                LONGINT;
  1299.         ioCompletion:            MSAMIOCompletionUPP;
  1300.         ioResult:                OSErr;
  1301.         saveA5:                    LONGINT;
  1302.         reqCode:                INTEGER;
  1303.         mailMsgRef:                MailMsgRef;
  1304.         recipientIndex:            INTEGER;                                {  recipient index in the original letter  }
  1305.         result:                    OSErr;                                    {  result of sending the recipient  }
  1306.     END;
  1307.  
  1308. {**************************************************************************************}
  1309.     MailWakeupPMSAMPBPtr = ^MailWakeupPMSAMPB;
  1310.     MailWakeupPMSAMPB = RECORD
  1311.         qLink:                    Ptr;
  1312.         reservedH1:                LONGINT;
  1313.         reservedH2:                LONGINT;
  1314.         ioCompletion:            MSAMIOCompletionUPP;
  1315.         ioResult:                OSErr;
  1316.         saveA5:                    LONGINT;
  1317.         reqCode:                INTEGER;
  1318.         pmsamCID:                CreationID;
  1319.         mailSlotID:                MailSlotID;
  1320.     END;
  1321.  
  1322.     MailCreateMailSlotPBPtr = ^MailCreateMailSlotPB;
  1323.     MailCreateMailSlotPB = RECORD
  1324.         qLink:                    Ptr;
  1325.         reservedH1:                LONGINT;
  1326.         reservedH2:                LONGINT;
  1327.         ioCompletion:            MSAMIOCompletionUPP;
  1328.         ioResult:                OSErr;
  1329.         saveA5:                    LONGINT;
  1330.         reqCode:                INTEGER;
  1331.         mailboxRef:                MailboxRef;
  1332.         timeout:                LONGINT;
  1333.         pmsamCID:                CreationID;
  1334.         smca:                    SMCA;
  1335.     END;
  1336.  
  1337.     MailModifyMailSlotPBPtr = ^MailModifyMailSlotPB;
  1338.     MailModifyMailSlotPB = RECORD
  1339.         qLink:                    Ptr;
  1340.         reservedH1:                LONGINT;
  1341.         reservedH2:                LONGINT;
  1342.         ioCompletion:            MSAMIOCompletionUPP;
  1343.         ioResult:                OSErr;
  1344.         saveA5:                    LONGINT;
  1345.         reqCode:                INTEGER;
  1346.         mailboxRef:                MailboxRef;
  1347.         timeout:                LONGINT;
  1348.         pmsamCID:                CreationID;
  1349.         smca:                    SMCA;
  1350.     END;
  1351.  
  1352.     MSAMParamPtr = ^MSAMParam;
  1353.     MSAMParam = RECORD
  1354.         CASE INTEGER OF
  1355.         0: (
  1356.             qLink:                Ptr;
  1357.             reservedH1:            LONGINT;
  1358.             reservedH2:            LONGINT;
  1359.             ioCompletion:        MSAMIOCompletionUPP;
  1360.             ioResult:            OSErr;
  1361.             saveA5:                LONGINT;
  1362.             reqCode:            INTEGER;
  1363.            );
  1364.         1: (
  1365.             pmsamGetMSAMRecord:    PMSAMGetMSAMRecordPB;
  1366.             );
  1367.         2: (
  1368.             pmsamOpenQueues:    PMSAMOpenQueuesPB;
  1369.             );
  1370.         3: (
  1371.             pmsamSetStatus:        PMSAMSetStatusPB;
  1372.             );
  1373.         4: (
  1374.             pmsamLogError:        PMSAMLogErrorPB;
  1375.             );
  1376.         5: (
  1377.             smsamSetup:            SMSAMSetupPB;
  1378.             );
  1379.         6: (
  1380.             smsamStartup:        SMSAMStartupPB;
  1381.             );
  1382.         7: (
  1383.             smsamShutdown:        SMSAMShutdownPB;
  1384.             );
  1385.         8: (
  1386.             msamEnumerate:        MSAMEnumeratePB;
  1387.             );
  1388.         9: (
  1389.             msamDelete:            MSAMDeletePB;
  1390.             );
  1391.         10: (
  1392.             msamOpen:            MSAMOpenPB;
  1393.             );
  1394.         11: (
  1395.             msamOpenNested:        MSAMOpenNestedPB;
  1396.             );
  1397.         12: (
  1398.             msamClose:            MSAMClosePB;
  1399.             );
  1400.         13: (
  1401.             msamGetMsgHeader:    MSAMGetMsgHeaderPB;
  1402.             );
  1403.         14: (
  1404.             msamGetAttributes:    MSAMGetAttributesPB;
  1405.             );
  1406.         15: (
  1407.             msamGetRecipients:    MSAMGetRecipientsPB;
  1408.             );
  1409.         16: (
  1410.             msamGetContent:        MSAMGetContentPB;
  1411.             );
  1412.         17: (
  1413.             msamGetEnclosure:    MSAMGetEnclosurePB;
  1414.             );
  1415.         18: (
  1416.             msamEnumerateBlocks: MSAMEnumerateBlocksPB;
  1417.             );
  1418.         19: (
  1419.             msamGetBlock:        MSAMGetBlockPB;
  1420.             );
  1421.         20: (
  1422.             msamMarkRecipients:    MSAMMarkRecipientsPB;
  1423.             );
  1424.         21: (
  1425.             msamnMarkRecipients: MSAMnMarkRecipientsPB;
  1426.             );
  1427.         22: (
  1428.             msamCreate:            MSAMCreatePB;
  1429.             );
  1430.         23: (
  1431.             msamBeginNested:    MSAMBeginNestedPB;
  1432.             );
  1433.         24: (
  1434.             msamEndNested:        MSAMEndNestedPB;
  1435.             );
  1436.         25: (
  1437.             msamSubmit:            MSAMSubmitPB;
  1438.             );
  1439.         26: (
  1440.             msamPutMsgHeader:    MSAMPutMsgHeaderPB;
  1441.             );
  1442.         27: (
  1443.             msamPutAttribute:    MSAMPutAttributePB;
  1444.             );
  1445.         28: (
  1446.             msamPutRecipient:    MSAMPutRecipientPB;
  1447.             );
  1448.         29: (
  1449.             msamPutContent:        MSAMPutContentPB;
  1450.             );
  1451.         30: (
  1452.             msamPutEnclosure:    MSAMPutEnclosurePB;                        {  this field is SYSTEM8_DEPRECATED }
  1453.             );
  1454.         31: (
  1455.             msamPutBlock:        MSAMPutBlockPB;
  1456.             );
  1457.         32: (
  1458.             msamCreateReport:    MSAMCreateReportPB;                        {  Reports and Error Handling Calls  }
  1459.             );
  1460.         33: (
  1461.             msamPutRecipientReport: MSAMPutRecipientReportPB;
  1462.             );
  1463.         34: (
  1464.             pmsamCreateMsgSummary: PMSAMCreateMsgSummaryPB;
  1465.             );
  1466.         35: (
  1467.             pmsamPutMsgSummary:    PMSAMPutMsgSummaryPB;
  1468.             );
  1469.         36: (
  1470.             pmsamGetMsgSummary:    PMSAMGetMsgSummaryPB;
  1471.             );
  1472.         37: (
  1473.             wakeupPMSAM:        MailWakeupPMSAMPB;
  1474.             );
  1475.         38: (
  1476.             createMailSlot:        MailCreateMailSlotPB;
  1477.             );
  1478.         39: (
  1479.             modifyMailSlot:        MailModifyMailSlotPB;
  1480.             );
  1481.     END;
  1482.  
  1483. TempMSAMParam    =    MSAMParam;
  1484.  
  1485. CONST
  1486.     uppMSAMIOCompletionProcInfo = $00009802;
  1487.  
  1488. PROCEDURE CallMSAMIOCompletionProc(VAR paramBlock: TempMSAMParam; userRoutine: MSAMIOCompletionUPP);
  1489.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1490.     {To be implemented:  Glue to move parameters into registers.}
  1491.     {$ENDC}
  1492.  
  1493. FUNCTION NewMSAMIOCompletionProc(userRoutine: MSAMIOCompletionProcPtr): MSAMIOCompletionUPP;
  1494.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1495.     INLINE $2E9F;
  1496.     {$ENDC}
  1497. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1498. FUNCTION MailCreateMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1499.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1500.     INLINE $7001, $1F00, $3F3C, $052B, $AA5E;
  1501.     {$ENDC}
  1502. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1503. FUNCTION MailModifyMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1504.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1505.     INLINE $7001, $1F00, $3F3C, $052C, $AA5E;
  1506.     {$ENDC}
  1507. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1508. FUNCTION MailWakeupPMSAM(VAR paramBlock: MSAMParam): OSErr;
  1509.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1510.     INLINE $7001, $1F00, $3F3C, $0507, $AA5E;
  1511.     {$ENDC}
  1512. { Personal MSAM Glue Routines }
  1513. FUNCTION PMSAMOpenQueues(VAR paramBlock: MSAMParam): OSErr;
  1514.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1515.     INLINE $7000, $1F00, $3F3C, $0500, $AA5E;
  1516.     {$ENDC}
  1517. FUNCTION PMSAMSetStatus(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1518.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1519.     INLINE $3F3C, $0527, $AA5E;
  1520.     {$ENDC}
  1521. { SYNC ONLY }
  1522. FUNCTION PMSAMGetMSAMRecord(VAR paramBlock: MSAMParam): OSErr;
  1523.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1524.     INLINE $7000, $1F00, $3F3C, $0506, $AA5E;
  1525.     {$ENDC}
  1526. { Server MSAM Glue Routines }
  1527. { SYNC ONLY }
  1528. FUNCTION SMSAMSetup(VAR paramBlock: MSAMParam): OSErr;
  1529.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1530.     INLINE $7000, $1F00, $3F3C, $0523, $AA5E;
  1531.     {$ENDC}
  1532. { SYNC ONLY }
  1533. FUNCTION SMSAMStartup(VAR paramBlock: MSAMParam): OSErr;
  1534.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1535.     INLINE $7000, $1F00, $3F3C, $0501, $AA5E;
  1536.     {$ENDC}
  1537. FUNCTION SMSAMShutdown(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1538.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1539.     INLINE $3F3C, $0502, $AA5E;
  1540.     {$ENDC}
  1541. { Get Interface Glue Routines }
  1542. FUNCTION MSAMEnumerate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1543.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1544.     INLINE $3F3C, $0503, $AA5E;
  1545.     {$ENDC}
  1546. FUNCTION MSAMDelete(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1547.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1548.     INLINE $3F3C, $0504, $AA5E;
  1549.     {$ENDC}
  1550. FUNCTION MSAMMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1551.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1552.     INLINE $3F3C, $0505, $AA5E;
  1553.     {$ENDC}
  1554. FUNCTION MSAMnMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1555.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1556.     INLINE $3F3C, $0512, $AA5E;
  1557.     {$ENDC}
  1558. FUNCTION MSAMOpen(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1559.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1560.     INLINE $3F3C, $0508, $AA5E;
  1561.     {$ENDC}
  1562. FUNCTION MSAMOpenNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1563.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1564.     INLINE $3F3C, $0509, $AA5E;
  1565.     {$ENDC}
  1566. FUNCTION MSAMClose(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1567.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1568.     INLINE $3F3C, $050A, $AA5E;
  1569.     {$ENDC}
  1570. FUNCTION MSAMGetRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1571.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1572.     INLINE $3F3C, $050C, $AA5E;
  1573.     {$ENDC}
  1574. FUNCTION MSAMGetAttributes(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1575.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1576.     INLINE $3F3C, $050B, $AA5E;
  1577.     {$ENDC}
  1578. FUNCTION MSAMGetContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1579.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1580.     INLINE $3F3C, $050D, $AA5E;
  1581.     {$ENDC}
  1582. FUNCTION MSAMGetEnclosure(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1583.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1584.     INLINE $3F3C, $050E, $AA5E;
  1585.     {$ENDC}
  1586. FUNCTION MSAMEnumerateBlocks(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1587.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1588.     INLINE $3F3C, $050F, $AA5E;
  1589.     {$ENDC}
  1590. FUNCTION MSAMGetBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1591.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1592.     INLINE $3F3C, $0510, $AA5E;
  1593.     {$ENDC}
  1594. FUNCTION MSAMGetMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1595.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1596.     INLINE $3F3C, $0511, $AA5E;
  1597.     {$ENDC}
  1598. { Put Interface Glue Routines }
  1599. FUNCTION MSAMCreate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1600.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1601.     INLINE $3F3C, $0514, $AA5E;
  1602.     {$ENDC}
  1603. FUNCTION MSAMBeginNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1604.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1605.     INLINE $3F3C, $0515, $AA5E;
  1606.     {$ENDC}
  1607. FUNCTION MSAMEndNested(VAR paramBlock: MSAMParam): OSErr;
  1608.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1609.     INLINE $7000, $1F00, $3F3C, $0516, $AA5E;
  1610.     {$ENDC}
  1611. {  SYNCHRONOUS ONLY }
  1612. FUNCTION MSAMSubmit(VAR paramBlock: MSAMParam): OSErr;
  1613.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1614.     INLINE $7000, $1F00, $3F3C, $0517, $AA5E;
  1615.     {$ENDC}
  1616. FUNCTION MSAMPutAttribute(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1617.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1618.     INLINE $3F3C, $0518, $AA5E;
  1619.     {$ENDC}
  1620. FUNCTION MSAMPutRecipient(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1621.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1622.     INLINE $3F3C, $0519, $AA5E;
  1623.     {$ENDC}
  1624. FUNCTION MSAMPutContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1625.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1626.     INLINE $3F3C, $051A, $AA5E;
  1627.     {$ENDC}
  1628. {  SYNCHRONOUS ONLY }
  1629. FUNCTION MSAMPutEnclosure(VAR paramBlock: MSAMParam): OSErr;
  1630.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1631.     INLINE $7000, $1F00, $3F3C, $051B, $AA5E;
  1632.     {$ENDC}
  1633. FUNCTION MSAMPutBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1634.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1635.     INLINE $3F3C, $051C, $AA5E;
  1636.     {$ENDC}
  1637. FUNCTION MSAMPutMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1638.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1639.     INLINE $3F3C, $051D, $AA5E;
  1640.     {$ENDC}
  1641. { Reports and Error Handling Glue Routines }
  1642. FUNCTION MSAMCreateReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1643.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1644.     INLINE $3F3C, $051F, $AA5E;
  1645.     {$ENDC}
  1646. FUNCTION MSAMPutRecipientReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1647.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1648.     INLINE $3F3C, $0520, $AA5E;
  1649.     {$ENDC}
  1650. FUNCTION PMSAMLogError(VAR paramBlock: MSAMParam): OSErr;
  1651.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1652.     INLINE $7000, $1F00, $3F3C, $0521, $AA5E;
  1653.     {$ENDC}
  1654. { MsgSummary Glue Routines }
  1655. FUNCTION PMSAMCreateMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1656.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1657.     INLINE $3F3C, $0522, $AA5E;
  1658.     {$ENDC}
  1659. FUNCTION PMSAMPutMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1660.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1661.     INLINE $3F3C, $0525, $AA5E;
  1662.     {$ENDC}
  1663. FUNCTION PMSAMGetMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1664.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1665.     INLINE $3F3C, $0526, $AA5E;
  1666.     {$ENDC}
  1667.  
  1668. {$ALIGN RESET}
  1669. {$POP}
  1670.  
  1671. {$SETC UsingIncludes := OCEMailIncludes}
  1672.  
  1673. {$ENDC} {__OCEMAIL__}
  1674.  
  1675. {$IFC NOT UsingIncludes}
  1676.  END.
  1677. {$ENDC}
  1678.